home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / util / lockap22.zip / manual.txt < prev    next >
Text File  |  1994-12-02  |  16KB  |  638 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                           Lock Tools Administration Manual
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                                     Steve Clarke
  17.  
  18.                                       May 1994
  19.  
  20.  
  21.             Lock Tools Administration Manual                                 Page 2
  22.  
  23.  
  24.  
  25.             INTRODUCTION
  26.  
  27.             The Lock suite of programs is provided to give network
  28.             administrators the ability to control the number of copies
  29.             that a peice of software may be run at any one time.  The
  30.             software has no network specific calls, and therefore should
  31.             work an any network where file read/write sharing can be
  32.             performed.
  33.  
  34.             There are three types of lock, DOS, Windows, and Windows
  35.             Stub.  DOS locks can be applied to any DOS application;
  36.             Windows locks can be applied to any Windows 3.1 application.
  37.             Windows Stub locks are special, and intended purely for the
  38.             WIN.COM program.
  39.  
  40.             The programs have been tested on MS DOS 3.3, 5.0, 6.0 and
  41.             6.2, Windows 3.1, and Windows 3.11.
  42.  
  43.             The Windows lock program requires the use of  TOOLHELP.DLL
  44.             (which is distributed with Windows).
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.                                                                 05/17/94
  81.  
  82.  
  83.             Lock Tools Administration Manual                                 Page 3
  84.  
  85.  
  86.  
  87.             INSTALLING
  88.  
  89.             The installation program uses four separate areas:
  90.  
  91.             o    A program area.  This area must be made read only by
  92.                  users, and must exist in the PATH.
  93.  
  94.             o    An administration program area.  This area is in a
  95.                  subdirectory under the program area, and is called
  96.                  ADMIN.  It contains the lock management tools and
  97.                  documentation.  This subdirectory should not be
  98.                  accessible to users (apart from the system manager).
  99.  
  100.             o    A control directory.  This directory holds information
  101.                  about how many applications of each type are allowed to
  102.                  be run.  This directory should be made read only to
  103.                  users.
  104.  
  105.             o    A Lock directory.  This directory is where all of the
  106.                  locks are stored.  It should be made read/write to
  107.                  users.  When locks are taken out, the attributes are
  108.                  changed to read-only through DOS;  this will cause the
  109.                  lockrm program to behave differently on different types
  110.                  of network.
  111.  
  112.             To install the program, put the installation disk into a
  113.             disk drive (A:, say), then type A:INSTALL.  (Note that it is
  114.             possible to install from any drive or subdirectory).
  115.  
  116.             Once the install program has read in its configuration data,
  117.             you will be asked which is the destination directory for the
  118.             programs.  Once entered, this directory will be created (if
  119.             possible).  If at any time, you wish to abort the install
  120.             procedure, simply press the Escape key.
  121.  
  122.             You will then be prompted for the Control Directory.  Enter
  123.             the full path name for this directory.
  124.  
  125.             You will then be prompted for the Lock Directory.  Enter the
  126.             full path name for this directory.
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.                                                                 05/17/94
  143.  
  144.  
  145.             Lock Tools Administration Manual                                 Page 4
  146.  
  147.  
  148.  
  149.             The installation procedure will continue, and all of the
  150.             files will be copied into their respective directories.  In
  151.             addition, the installation procedure will create a LOCK.INI
  152.             file in the program directory.  IF YOU ARE UPGRADING FROM A
  153.             PREVIOUS VERSION, THE LOCK.INI FILE WILL BE OVERWRITTEN.
  154.  
  155.             When the istallation procedure is complete, you will be left
  156.             in the program directory.  As the software is network
  157.             independant, it is not possible to change any of the network
  158.             file permissions.  You should do this now, manually.
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.                                                                 05/17/94
  205.  
  206.  
  207.             Lock Tools Administration Manual                                 Page 5
  208.  
  209.  
  210.  
  211.             CONFIGURING A MACHINE
  212.  
  213.             To enable a machine to identify which locked applications
  214.             belong to it, each machine is given a host reference.  This
  215.             should be a one, or two letter identification string.  To
  216.             set the string, add a line to the machine's boot file
  217.             (AUTOEXEC.BAT) as follows:
  218.  
  219.             set HOSTID=xx
  220.  
  221.             Where xx is a one or two character sequence which is unique.
  222.             Note that 'AA' and 'aa' are treated as the same HOSTID by
  223.             the lock tools.
  224.  
  225.  
  226.             CONFIGURING A USER
  227.  
  228.             To enable the correct reporting of which user has taken out
  229.             which application, each user should have an identification
  230.             string.  Ideally, this should be unique.  To set the string,
  231.             add a line to the user's login file (or to the system login
  232.             file) as follows:
  233.  
  234.             set USR=uuuuuuu
  235.  
  236.             Where uuuuuuu is the username.  Note that this username is
  237.             used for outputting information only (up to 32 characters
  238.             will be displayed), so there are only practical limits on
  239.             its size and contents.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                                                 05/17/94
  267.  
  268.  
  269.             Lock Tools Administration Manual                                 Page 6
  270.  
  271.  
  272.  
  273.             THE LCONFIG UTILITY
  274.  
  275.             To create a blank LOCK.INI file in the current directory,
  276.             lconfig may be used.  Type the following:
  277.  
  278.                  lconfig CreateIni  path_to_lockdir  path_to_controldir
  279.  
  280.             The LOCK.INI file should be edited manually to include user
  281.             name and registration data.
  282.  
  283.             To take out locks on an application, the program lconfig
  284.             should be used (with no parameters).  Once started, you will
  285.             be shown a screen with a menu bar, and an empty box.
  286.  
  287.             At any time when using this program (apart from when
  288.             entering a string), pressing Escape (or x) will cause the
  289.             program to end.
  290.  
  291.             To select an item off the menu bar, press the highlighted
  292.             letter.
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                                                 05/17/94
  329.  
  330.  
  331.             Lock Tools Administration Manual                                 Page 7
  332.  
  333.  
  334.  
  335.             LOCKING AN APPLICATION
  336.  
  337.             To lock an application, start up lconfig, and press 'I'.
  338.             You will be asked for an application name.  Enter the full
  339.             pathname (and filename) of the application (including the
  340.             extension).  For example:
  341.  
  342.             Enter Application to Lock:
  343.             L:\APPS\PROGRAM\BORLANDC\BIN\BC.EXE
  344.  
  345.             Note that if the application is already under lock, the
  346.             locking stub will be updated.
  347.  
  348.             If this is a new lock, you will be asked for a one line
  349.             description of the application.  You will then be asked
  350.             whether the application is (D)OS, (W)indows, or a Windows
  351.             (S)tub.  Select the appropriate response by pressing either
  352.             D,W, or S.  The lock for the application will then be
  353.             created, and the application should be added to the top
  354.             window.
  355.  
  356.             Locking an application involves the following process:
  357.  
  358.                  Rename PROGNAME.EXE to PROGNAM_.SLP
  359.                  Copy Appropriate Locking Stub to PROGNAME.EXE
  360.                  Create a control file called PROGNAME.0
  361.  
  362.             CHANGING NUMBER OF COPIED OF AN APPLICATION
  363.  
  364.             To change the nubmer of copies of an application which are
  365.             available, simply use the arrow keys to move the cursor to
  366.             the appropriate application, and type in a new number.  Afer
  367.             pressing Enter, you will be asked to confirm the change,
  368.             then the change will be made.
  369.  
  370.             The change procedure involves the following:
  371.  
  372.                  Rename Control file PROGNAME.xx to PROGNAME.yy
  373.  
  374.             (where xx = old number of copies, and yy = new number of
  375.             copies)
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                                                 05/17/94
  391.  
  392.  
  393.             Lock Tools Administration Manual                                 Page 8
  394.  
  395.  
  396.  
  397.             UNLOCKING AN APPLICATION
  398.  
  399.             To remove the lock from an application, use the arrow keys
  400.             to move the cursror to the application which requires
  401.             unlocking, and press 'D' (for lock delete).  You will then
  402.             be asked for the full pathname of the application (including
  403.             the extension).  This pathname is used to re-create the
  404.             original file name, so be sure to get the .COM or .EXE
  405.             extension correct.
  406.  
  407.             Once entered, the lock will be removed.  Note that an extra
  408.             layer of security has been added into the program with this
  409.             release, to remove the possibility of file deletion.  File
  410.             contents are checked, and a file will only be removed if it
  411.             is a valid lock stub.  This means that locking stubs from
  412.             previous versions of lock, and files that have been renamed
  413.             without the use of lconfig may cause errors.
  414.  
  415.             If these errors arise, it is up to the administrator to
  416.             ensure that the correct files are given the correct names.
  417.  
  418.             Unlocking an application involves the following procedure:
  419.  
  420.                  Delete PROGNAME.EXE
  421.                  Rename PROGNAM_.SLP to PROGNAME.EXE
  422.                  Delete control file PROGNAME.yy
  423.  
  424.  
  425.             GETTING INFORMATION
  426.  
  427.             To receive information about the user (registration), press
  428.             'I'.  The user and registration inforation is stored in the
  429.             LOCK.INI file.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.                                                                 05/17/94
  453.  
  454.  
  455.             Lock Tools Administration Manual                                 Page 9
  456.  
  457.  
  458.  
  459.             POTENTIAL HAZZARDS
  460.  
  461.             Problem:  Because the lock program PROGNAME.EXE always looks
  462.                       for the original program (now named PROGNAM_.SLP),
  463.                       the lock program will be unable to lock two
  464.                       applications in the same directory with only the
  465.                       last character in the filename different.  It will
  466.                       also be unable to lock a .EXE and a .COM file in
  467.                       the same directory.
  468.  
  469.             Example:
  470.  
  471.                  PROGA.EXE      Will all be renamed to PROG_.SLP
  472.                  PROGB.EXE
  473.                  PROGA.COM
  474.                  PROGB.COM
  475.  
  476.             Symptoms: LCONFIG will give an error saying that it cannot
  477.                       delete what it thinks should be a lock stub.
  478.  
  479.             Solution: Rename any potential problem files. so that no two
  480.                       programs in the same directory can cause this
  481.                       problem.
  482.  
  483.  
  484.             Problem:  Users crash an application, reboot the machine,
  485.                       then walk off.  Depending on the network, this can
  486.                       be a problem.  Some network configurations will
  487.                       insist on the original user running lockrm on the
  488.                       original machine, Some configurations will allow
  489.                       any user to run lockrm on the original machine.
  490.  
  491.             Symptoms: Lockrm refuses to remove locks on a machine.
  492.  
  493.             Solution: As there are may problems here, there is not one
  494.                       solution.  One possible solution is for the
  495.                       network administrator to remove the locks manually
  496.                       (ie attrib, then delete *.%MACHID% and *._%MACHID%
  497.                       in the control directory) - this is only possible
  498.                       if the network administrator can attrib other
  499.                       user's files. (check AD0001.BAT in the ADMIN
  500.                       directory).
  501.  
  502.                       A Second solution is for a job to run on the file
  503.                       server, searching for machines which are not
  504.                       turned on, and removing any files which belong to
  505.                       that machine. (check AD0002.SH in the ADMIN
  506.                       directory).
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.                                                                 05/17/94
  515.  
  516.  
  517.             Lock Tools Administration Manual                                 Page 10
  518.  
  519.  
  520.  
  521.  
  522.             ERROR MESSAGES
  523.  
  524.             The following error messages are due to an inconsistency in
  525.             the system configuration, they are intended for the System
  526.             Administrator.
  527.  
  528.             Unrecognised Machine Identification
  529.  
  530.                  This means that the HOSTID environment variable has not
  531.                  been set.  Set the environment variable.
  532.  
  533.             Unable to Find Overlay Application
  534.  
  535.                  PROGNAME.EXE could not find PROGNAM_.SLP.  This could
  536.                  be due to the file missing, or a network permissions
  537.                  problem.  Restore this file (It is the original
  538.                  PROGNAME.EXE and retry).
  539.  
  540.             Unable to Create Application Lock
  541.  
  542.                  The user does not have write permission to the lock
  543.                  directory.
  544.  
  545.             Unable to Remove Application Lock
  546.  
  547.                  Either the user has been denied write access to the
  548.                  lock directory whilst running an application, or his
  549.                  lock has been removed before the application has
  550.                  finished.
  551.  
  552.             Unable to Execute Application
  553.                  - Invalid Program Path
  554.                  - Invalid or Corrupt Program
  555.                  - WinExec Error nn
  556.  
  557.                  These error messages are reported by Windows, and
  558.                  intended to help give a better indication of as to why
  559.                  the child program cannot be run.
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.                                                                 05/17/94
  577.  
  578.  
  579.             Lock Tools Administration Manual                                 Page 11
  580.  
  581.  
  582.  
  583.             Unable to Access INI Data
  584.  
  585.                  The lock program cannot find the LOCK.INI file.  This
  586.                  is either the INI file is not in the PATH, or the INI
  587.                  file does not have read permissions.
  588.  
  589.             INIFile Error: No CONTROLDIR Entry in LOCK.INI
  590.             INIFile Error: No LOCKDIR Entry in LOCK.INI
  591.             INIFile Error: EXEFLAGS option on LOCK.INI should be X or A
  592.  
  593.                  A line in the LOCK.INI file is not syntactically
  594.                  correct (or is missing).  Correct the line (or re-
  595.                  create the INI file with lconfig).
  596.  
  597.  
  598.             This Application is Already Running on This Machine
  599.  
  600.             Either the application is running on the machine (another
  601.             Windows application, a DOS application in a DOS Window, or a
  602.             DOS application in an application DOS shell), or the machine
  603.             has crashed when an application was running.  Either use the
  604.             running application, or use LOCKRM to remove the incorrect
  605.             locks.
  606.  
  607.             Too Many Copies.  Try Again Later
  608.  
  609.             You have attempted to book out one more copy of an
  610.             application than has been allowed.  Use LOCKINFO to find out
  611.             who and where the applications are being used, and wait.
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.                                                                 05/17/94